JScriptClientPage.compile( 'sample', function(writer, input) { var se, ee, a, t, attribute, text; se = function(name) { writer.startElement(name); }; ee = function() { writer.endElement(); }; attribute = a = function(name, value) {writer.writeAttribute(name, value);}; text = t = function(text) {writer.writeText(text); }; se('h1'); t('JSCP Introduction'); ee(); se('p'); t('Welcome to JSCP. You can now create compiled client-side pages.'); ee(); se('p'); t('You requested a table with'); text(' '+input.rows + ' '); t('rows and'); text(' '+input.columns + ' '); t('columns'); ee(); se('p'); t('Here is the table you requested'); ee(); se('table'); a('className','grid'); for(var i = 1; i <= input.rows; i++) { se('tr'); for (var j=1; j <= input.columns; j++) { se('td'); text(i + ',' + j); ee(); } ee(); } ee(); } );